package cn.huiyunche.base.service.enums;

/**
 * 导入结果
 *
 * @author lm
 */
public enum ImportResultCodeEnum {

    ERROR(1,"错误"),
    WARN(2,"警告"),
    RIGHT(3,"正常"),
    FAIL(4,"导入失败"),
    NO_IMPORT(5,"未导入"),
    SUCCESS(6,"导入成功");

    private final int value;
    private final String text;

    ImportResultCodeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static ImportResultCodeEnum getByValue(int value) {
        for (ImportResultCodeEnum temp : ImportResultCodeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
